<!-- 大于一页才显示分页组件 -->
{% if pagination.Elements.1 %}
<ul class="pagination" role="navigation">

  {% if pagination.OnFirstPage %}
    <li class="page-item disabled" aria-disabled="true" aria-label="{{ pagination.PreviousButtonText }}">
      <span class="page-link" aria-hidden="true">&lsaquo;</span>
    </li>
  {% else %}
    <li class="page-item">
      <a class="page-link" href="{{ pagination.URL }}{{ pagination.PreviousPageIndex }}" rel="prev" aria-label="{{ pagination.PreviousButtonText }}">&lsaquo;</a>
    </li>
  {% endif %}

  {% for v in pagination.Elements %}
    {% if v == pagination.CurrentPage %}
      <li class="page-item active" aria-current="page"><span class="page-link">{{ v }}</span></li>
    {% else %}
      <li class="page-item"><a class="page-link" href="{{ pagination.URL }}{{ v }}">{{ v }}</a></li>
    {% endif %}
  {% endfor %}

  {% if pagination.HasMorePages %}
    <li class="page-item">
      <a class="page-link" href="{{ pagination.URL }}{{ pagination.NextPageIndex }}" rel="next" aria-label="{{ pagination.NextButtonText }}">&rsaquo;</a>
    </li>
  {% else %}
    <li class="page-item disabled" aria-disabled="true" aria-label="{{ pagination.NextButtonText }}">
      <span class="page-link" aria-hidden="true">&rsaquo;</span>
    </li>
  {% endif %}

</ul>
{% endif %}
